export const getAssetsImages = (name) => {
    return new URL(`/src/assets/images/${name}`, import.meta.url).href;
}

export const secondFormat = (second) => {
    let t = parseInt(second);
    let h = parseInt(t / 3600);
    let m = parseInt((t - h * 3600) / 60);
    let s = parseInt((t - h * 3600 - m * 60));
    h = h.toString().padStart(2, '0');
    m = m.toString().padStart(2, '0');
    s = s.toString().padStart(2, '0');

    return h == 0 ? `${m}:${s}` : `${h}:${m}:${s}`;
}
